﻿' Fhame Rashid 09209531
' MSc Software Engineering
' WSCC, Week 2, October 4th 2012
' f.rashid@outlook.com


Public Class BMICalculator
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btn_calculate_Click(sender As Object, e As EventArgs) Handles btn_calculate.Click

        'Input Varibale Declare
        Dim w As Single
        Dim h As Single

        'Content Extraction from textbox, convert String to Single
        w = CSng(tb_Weight.Text)
        h = CSng(tb_height.Text)

        'Calculate bmi from variables
        Dim bmi As Single
        bmi = w / (h * h)

        'Print calculated bmi and show it in Lebel
        lbl_result.Text = "You BMI is: " & bmi

    End Sub
End Class

'Notes
'Add Validator -> toolbox -> Validation : Range validator
